// 第三方
import React, {Suspense,memo} from 'react'
import {HashRouter} from 'react-router-dom'
import {renderRoutes} from 'react-router-config'
import { Provider } from "react-redux";

// 导入配置
import routes from 'router'
import  store from "store";

// 自己
import WYAppHeader from 'components/app-header'
import WYAppFooter from 'components/app-footer'
import HYAppPlayerBar from 'views/player/app-player-bar';


export default memo(function App() {
  return (
    <Provider store={store}>
        <HashRouter>
              <WYAppHeader/>
                  <Suspense fallback={<div>page loading</div>}>
                      {renderRoutes(routes)}
                    </Suspense> 
              <WYAppFooter/>
              <HYAppPlayerBar/>
        </HashRouter>
    </Provider>
  );
})
